﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net.Config;
using Spring.Context;
using JoyTalq.Core.Helper;
using JoyTalq.Core.Bus.Service;

namespace JoyTalq.Core.Bus
{
    public class BusFactory
    {
        public BusFactory()
        {
            XmlConfigurator.Configure();
        }

        public BusFactory(IApplicationContext applicationContext)
        {
            SpringHelper.ApplicationContext = applicationContext;
            XmlConfigurator.Configure();
        }

        public IBusService GetBusService()
        {
            return SpringHelper.ApplicationContext["BusServiceProxy"] as IBusService;
        }
    }
}
